
//id check----------------------------------
function checkID()
{
	var form = document.frm;
	if(form.username.value=="")
	{
		alert("Input username");
		form.username.focus();
		return false;
	}
	var url="checkId.jsp?username=" + form.username.value;
	window.open(url, '','width=300, height=170');
}
//Check-------------------------------------------
function checkForm()
{
	var form = document.frm;
	
	//username
	if(form.username.value=="" || form.username.value==null)
	{
		alert("Input username");
		form.username.focus();
		return false;
	}
	//name
	if(form.name.value=="" || form.name.value==null)
	{
		alert("Input name");
		form.name.focus();
		return false;
	}
	//username duplicate check
	else if(form.idchk.value == "n"){
		alert("check username duplicated");
		return false;
	}
	//password
	else if(form.passwd.value != form.repasswd.value) 
	{
		alert("passwords are not identical");
		form.passwd.value="";
		form.repasswd.value="";
		form.passwd.focus();
		return false;
	}
	//input password
	else if(form.passwd.value=="" || form.passwd.value==null ) 
	{
		alert("Input password");
		form.passwd.focus();
		return false;
	}
	else if(form.repasswd.value=="" || form.repasswd.value==null ) 
	{
		alert("Input password");
		form.passwd.focus();
		return false;
	}
	//e-mail
	else if(form.email.value=="" || form.email.value==null)
	{
		alert("Input E-MAIL");
		form.email.focus();
		return false;
	}
	else if(form.phone.value=="" || form.phone.value==null)
	{
		alert("Input Phone");
		form.phone.focus();
		return false;
	}
	else if(form.address.value=="" || form.address.value==null)
	{
		alert("Input Address");
		form.address.focus();
		return false;
	}
	else { 
		form.submit();
	}
}